<div class="deviceWrapper" id="deviceWrapper_0" style="background-image:url(<?php echo $this->baseUrl(); ?>/images/device_new.png);">
    <a class="deviceSelector" href="#">
        <span class="deviceName">New Device</span>
        <span class="deviceDescription">Create a new device</span>
        <span class="deviceIp">Add New Device</span>
        <input type="hidden" class="deviceLat" value="" />
        <input type="hidden" class="deviceLng" value="" />
        <input type="hidden" class="deviceId" value="0" />
    </a>
</div>
<?php foreach ($this->devices as $d): ?>
<div class="deviceWrapper" id="deviceWrapper_<?php echo $d['deviceId']; ?>" style="background-image:url(<?php echo $this->baseUrl(); ?>/images/device_<?php echo $d['type']; ?>.png);">
    <a class="deviceSelector" href="#">
        <span class="deviceName"><?php echo $d['name']; ?></span>
        <span class="deviceDescription"><?php echo $d['description']; ?></span>
        <span class="deviceIp"><?php echo $d['ip']; ?></span>
        <input type="hidden" class="deviceLat" value="<?php echo $d['lat']; ?>" />
        <input type="hidden" class="deviceLng" value="<?php echo $d['lng']; ?>" />
        <input type="hidden" class="deviceId" value="<?php echo $d['deviceId']; ?>" />
    </a>
</div>
<?php endforeach; ?>
<div class="ui-helper-clearfix"></div>